<%@page import="java.util.Calendar"%>
<%@page import="java.util.Date"%>
<%@page import="java.text.DateFormatSymbols"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link href="dist/css/starter-template.css" rel="stylesheet">
<title>Insert title here</title>
</head>
<body>
	<div class="container">
		<h3>Select Month</h3>
		<div class="selectMonth">
			<form action="ServletExportReports" method="post">
				<select name="month">
					<option value="select">Select Month</option>
					<%
						Calendar cal = Calendar.getInstance();
						Date dt= new Date();
						
						int MM= Integer.parseInt(new SimpleDateFormat("MM").format(dt));
						int yy= Integer.parseInt(new SimpleDateFormat("yyyy").format(dt));
						
						DateFormatSymbols dfs = new DateFormatSymbols();
						String[] months = dfs.getMonths();
						for (int i = 0; i < 12; i++) {
					%>
					<option value=<%=i+1%>><%=months[i]%></option>
					<%
						}
					%>
				</select> <select name="year">
					<option value="select">Select Year</option>
					<%
						for (int i = 2013; i <= yy; i++) {
					%>
					<option value=<%=i%>><%=i%></option>
					<%
						}
					%>
				</select>
				<button	class="btn btn-sm btn-primary " type="submit">Generate Reports</button>
			</form>
			<%
			if(session.getAttribute("errMsg")!=null)
			{%>
				 <label style="color: RED"><%= session.getAttribute("errMsg").toString() %></label>
			<%} %>
		</div>
	</div>
</body>
</html>